package com.oig.sys.base.dao;

import com.oig.sys.base.entity.TbCountryGroup;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
@author wuxl
*/
public interface ITbCountryGroupDao extends JpaRepository<TbCountryGroup, Integer>, JpaSpecificationExecutor<TbCountryGroup> {

	TbCountryGroup getTbCountryGroupById(Integer id);

	TbCountryGroup getTbCountryGroupByName(String name);

	@Query("from TbCountryGroup g where g.status='04' ")
	List<TbCountryGroup> findByOkGroup();

}
